// src/features/conversations/api/use-get-conversation.ts
import {MARK_DATA_URL} from "@/lib/social/constants";

interface Props {
    id: string
}

export const useGetConversation = async ({id}: Props) => {
    const res = await fetch(
        // `${MARK_DATA_URL}/conversations/${id}`,
        `/api/conversations/${id}`,
    )
    const data = await res.json()
    const isLoading = data === undefined

    return {data, isLoading}
}